cordova.define("bsl.cordova.plugins.dowm.downitem", function(require, exports, module) {
               
               var exec = require('cordova/exec'),
               cordova = require('cordova'),
               channel = require('cordova/channel'),
               utils = require('cordova/utils');
             
               
               var downitem= function(fileID, fileName, fileSize, fileType, fileReceivedSize, fileURL,isDownloading, willDownloading,targetPath) {
                description: "单个下载任务",
               this.fileID = fileID || null;
               this.fileName =fileName|| null;
               this.fileSize = fileSize || null;
               this.fileType = fileType || null;
               this.fileReceivedSize = fileReceivedSize || null;
               this.fileURL = fileURL || null;
               this.isDownloading = isDownloading || null;
               this.willDownloading = willDownloading || null;
               this.targetPath = targetPath || null;
               };
               
               downitem.prototype.abort = function() {
               cordova.exec(function(){
                            alert('暂停成功－－－－');
                            },function(){
                            alert('暂停失败－－－－');
                            },
                            "download","abort",
                            [{
                             url:this.fileURL,
                             filename:this.fileName,
                             type:this.fileType
                             
                             }]);
               
               }
               downitem.prototype.addEventListenering = function(successBlock,errorBlock) {
               cordova.exec(successBlock,errorBlock,
                            "download","addEventListener",
                            [{
                             url:this.fileURL,
                             filename:this.fileName,
                             type:this.fileType
                            }]);
               
               }
               downitem.prototype.pause = function() {
               
               cordova.exec(function(){
                            alert('addEventListener成功');
                            },function(){
                            alert('addEventListener失败');
                            },
                            "download","pause",
                            [{
                             url:this.fileURL,
                             filename:this.fileName,
                             type:this.fileType
                             }]);
               
               }
               downitem.prototype.resume = function() {
               cordova.exec(function(){
                            alert('resume成功');
                            },function(){
                            alert('resume失败');
                            },
                            "download","resume",
                            [{
                             url:this.fileURL,
                             filename:this.fileName,
                             type:this.fileType
                             }]);
               
               }
               downitem.prototype.start = function() {
               cordova.exec(function(){
                            alert('addEventListener成功');
                            },function(){
                            alert('addEventListener失败');
                            },
                            "download","start",
                            [{
                             url:this.fileURL,
                             filename:this.fileName
//                             type:this.fileType
                        }]);
               
               }
               
               
               module.exports = downitem;
               
               
//               downloadTask.install = function () {
//               if (!window.plugins) {
//               window.plugins = {};
//               }
//               
//               window.plugins.downloadTask = new downloadTask();
//               return window.plugins.downloadTask;
//               };
//               
               cordova.addConstructor(downitem());
//
//               
//               });
//
               
});
